#include <gtest/gtest.h>

extern unsigned int getAverage();

struct Test4 : ::testing::Test
{
    static void throw_err(int)
    {
        throw std::exception();
    }

    virtual void SetUp() override
    {
#ifndef WIN32
        signal(SIGFPE, throw_err);
#endif
    }
};

TEST_F(Test4, should_not_throw_except)
{
    for(int i = 0;i <100; i++)
    {
        ASSERT_NO_THROW(getAverage());
    }
}

